package com.zwh.modbus.netty.modbus.tcp.util;

/**
 * crc校验
 * @author zwh
 * @date 2023-9-28 17:57
 */
public class CrcUtils {

    public void countCRC(String addr, int num) {

    }
    /*unsigned short count_CRC(unsigned char *addr, int num)
    {
        unsigned short CRC = 0xFFFF;
        int i;
        while (num--)
        {
            CRC ^= *addr++;
            for (i = 0; i < 8; i++)
            {
                if (CRC & 1)
                {
                    CRC >>= 1;
                    CRC ^= 0xA001;
                }
                else
                {
                    CRC >>= 1;
                }
            }
        }
        return CRC;
    }*/
}
